/**
 ***********************************************************************
 * Program name: DateUtil.java<br>
 * Program description: TODO<br>
 * Author: sugen<br>
 * Revision history:1.0<br>
 * <br>
 * Description of Change	Programmer		Date<br>
 * ---------------------    ----------      ----<br>
 * Initial creation			Su Gen		   2011-3-9 <br>
 * <br>
 * Copyright (c) 2011 by SUGEN ALL RIGHTS RESERVED<br>
 ************************************************************************
 */
package com.common;

import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;


public final class DateUtil {
	
	public static final String DATE_FORMAT_YYYY_MM_DD = "yyyy-MM-dd";

	public static String getDateOfString(long time, String patten) throws ParseException {
		if(time!=0){
			return (new SimpleDateFormat(patten).format(new Date(time))).toString();
		}
		return "";
	}
}